<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>宇涵农业</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="/yuhan/Public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/yuhan/Public/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="/yuhan/Public/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="/yuhan/Public/css/animate.css" rel="stylesheet">
    <link href="/yuhan/Public/css/style.css?v=4.1.0" rel="stylesheet">
    <script src="/yuhan/Public/js/jquery.min.js"></script>


</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title" style="position: relative;">
                    <h5>商品分类管理</h5><br>

                </div>
                <a class="btn btn-primary add_btn" data-toggle="modal" href="form_basic.html#modal-form">新增</a>
                <div class="ibox-content">
                    <div id="text-form">
                        <div class="text-form">
                            <form action="" method="post">
                                <label>
                                    <span>分类名称：</span>
                                    <input type="text" class="form-control input-sm"/>
                                    <br>
                                    <input type="submit" value="查询" class="btn btn-primary"/>
                                    <input type="reset" class="btn btn-primary" value="重置" />
                                    <div class="clear_float"></div>
                                </label>
                            </form>
                        </div>
                        <div class="clear_float"></div>
                    </div>

                    <div class="clear_float"></div>
                    <table class="table table-striped table-bordered table-hover dataTables-example">
                        <thead>
                        <tr>
                            <th>图片</th>
                            <th>分类ID</th>
                            <th>分类名称</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php if(is_array($typelist)): $i = 0; $__LIST__ = $typelist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><tr class="gradeA">
                                <td><img class="spfl_tab_img" src=""></td>
                                <td><?php echo ($list["typeid"]); ?></td>
                                <td><?php echo ($list["typename"]); ?></td>
                                <td class="center">
                                    <a data-toggle="modal" href="form_basic.html#modal-form">编辑</a>
                                    <a href="#" class="a_remove">删除</a>
                                </td>
                            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>
</div>

<div id="modal-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="tc-form">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title" style="border: 0;">
                                <h5>添加会员</h5>
                            </div>
                            <div class="ibox-content">
                                <form method="get" class="form-horizontal">
                                    <div class="col-sm-4 col-sm-offset-2 btn_tab" id="Tab_parent" style="width: 100%">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><i
                                                    class="red-color">*</i>所属分类：</label>

                                            <div class="col-sm-10">
                                                <select class="form-control m-b" name="account">
                                                    <option>选项 1</option>
                                                    <option>选项 2</option>
                                                    <option>选项 3</option>
                                                    <option>选项 4</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><i
                                                    class="red-color">*</i>分类名称：</label>

                                            <div class="col-sm-10">
                                                <input type="text" class="form-control">
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><i
                                                    class="red-color">*</i>积分比例：</label>

                                            <div class="col-sm-8">
                                                <input type="text" class="form-control">
                                            </div>
                                            <div class="col-sm-1 control-label"
                                                 style="text-align: left; padding-left: 0;">%
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"><i
                                                    class="red-color">*</i>分类图标：</label>

                                            <div class="col-sm-10">
                                                <div class="subfild-content base-info ggzy font_w yqlj">
                                                    <div class="kv-item ue-clear cjst">
                                                        <img src="" id="img0">
                                                        <div class="kv-item-content file cjst_file"
                                                             style="width:50px; margin-right:10px;">
                                                            <input type="file" id="file0" multiple="multiple"/>
                                                            <input type="button" class="button normal long2" value="选择"
                                                                   style="margin:0;"/>
                                                        </div>
                                                    </div>
                                                    <div class="clear_float"></div>
                                                </div>
                                                <script>
                                                    $("#file0").change(function () {
                                                        var objUrl = getObjectURL(this.files[0]);
                                                        console.log("objUrl = " + objUrl);
                                                        if (objUrl) {
                                                            $("#img0").attr("src", objUrl);
                                                        }
                                                    });
                                                    //建立一個可存取到該file的url
                                                    function getObjectURL(file) {
                                                        var url = null;
                                                        if (window.createObjectURL != undefined) { // basic
                                                            url = window.createObjectURL(file);
                                                        } else if (window.URL != undefined) { // mozilla(firefox)
                                                            url = window.URL.createObjectURL(file);
                                                        } else if (window.webkitURL != undefined) { // webkit or chrome
                                                            url = window.webkitURL.createObjectURL(file);
                                                        }
                                                        return url;
                                                    }
                                                </script>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <div class="col-sm-4 col-sm-offset-2 text-center" style="width: 100%">
                                                <button class="btn btn-primary" type="submit">保存</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<script src="/yuhan/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/yuhan/Public/js/bootstrap.min.js?v=3.3.6"></script>


<script src="/yuhan/Public/js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="/yuhan/Public/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="/yuhan/Public/js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- 自定义js -->
<script src="/yuhan/Public/js/content.js?v=1.0.0"></script>
<script src="/yuhan/Public/js/tab.js"></script>


<!-- Page-Level Scripts -->


<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<!--统计代码，可删除-->

</body>

</html>